import { request, requestHasToken } from '@/utils/request'

/**
 * 登录
 */
export function login(data) {
  return request({
    method: 'post',
    url: `/admin/login`,
    data
  })
}

/**
 * 注册
 */
export function register(data) {
  return request({
    method: 'post',
    url: `/admin/register`,
    data
  })
}

export function updatePwd(data) {
  return requestHasToken({
    method: 'post',
    url: `/updatePwd`,
    data,
    params: data
  })
}
